package com.patterns.flyweight;

/**
 * 
 * ConcreteFlyweight具体享元类
 * @author huangke
 *
 */
public class ChessConcreteFlyweight implements ChessFlyweight{
	
	private String color;// >> 共享属性


	public ChessConcreteFlyweight(String color) {
		this.color = color;
	}

	public String getColor() {
		return this.color;
	}

	public void display(ChessUnsharedConcreteFlyweight c) {
		System.out.println("棋子颜色：" + color + " 坐标:" + c.getX() + "," + c.getY());
	}

}
